package com.xiaocz.hblsubstitutedriving.service;

import android.app.admin.DeviceAdminReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

/**
 * Time:2020/8/10
 * Created by xiaocz
 * Describe
 */
public class ScreenOffAdminReceiver   extends DeviceAdminReceiver

    {
        private void showToast(Context context, String msg) {
            Toast.makeText(context, msg, Toast.LENGTH_SHORT).show();
        }

        @Override
        public void onEnabled(Context context, Intent intent) {
            showToast(context,
                    "设备管理器使能");
        }

        @Override
        public void onDisabled(Context context, Intent intent) {
            showToast(context,
                    "设备管理器没有使能");
        }
}
